package com.pinyoumei.app.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.pinyoumei.app.R;
import com.pinyoumei.app.bean.FirstBean;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * Created by Administrator on 2021-08-09.
 * --------- 日期 ------- 维护人 ------------ 变更内容 --------
 * 2021-08-09        Administrator             新增Person类
 * 2021-08-09        Administrator             增加sex属性
 */
public class FirstPTAdapter extends BaseQuickAdapter<FirstBean.ResultBean.SpellGoodsListBean, BaseViewHolder> {
    public FirstPTAdapter(int layoutResId, @Nullable List<FirstBean.ResultBean.SpellGoodsListBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FirstBean.ResultBean.SpellGoodsListBean item) {
        ImageView iv_pt_goods_img = helper.getView(R.id.iv_pt_goods_img);

        Glide.with(mContext).load(item.getPt_goods_img()).into(iv_pt_goods_img);

        helper.setText(R.id.tv_goods_name,item.getGoods_name());

        helper.setText(R.id.tv_pt_price,"" + item.getPt_price());
    }
}
